import React, { useEffect } from 'react';
import { iframeFunCallExpose } from '../utils/iframe';

const DocsPage = () => {

  const [state, setState] = React.useState();
 
  useEffect(() => {
    const testAlert = (path: string) => {
      setState(path);
    };
  
    return iframeFunCallExpose({
      testAlert,
    });
  }, []);

  return (
    <div>
      <div>这是子模块3的 page3</div>
      <div>来自于父模块的数据：{state}</div>
    </div>
  );
};
  
export default DocsPage;
  